from api.base_api import BasePrimeSpApi


class PrimeSpLoginApi(BasePrimeSpApi):
    """
    SP登录接口
    """
    def __init__(self, username, password):
        super().__init__()  # 继承父类属性
        self.url = f'{self.host}/api/prime/auth/login/'
        self.method = 'post'
        self.json = {
            'email': username,
            'password': password,
            'authCode': '666666',
        }


if __name__ == '__main__':
    prime_login_api = PrimeSpLoginApi('jiade.wu@antalpha.com', 'Qwer`123')
    resp = prime_login_api.send()
    print(resp.json())
